#ifndef GRAPHNODE_H
#define GRAPHNODE_H

#include "BaseUI.h"
#include "../MeasConnectionHandler.h"

#include <QWidget>
#include <QString>

namespace ui {

#define COLOR_DATA_SOURCE      "color: rgb(255, 0, 0);"
#define COLOR_DATA_PROC        "color: rgb(255, 255, 255);"
#define COLOR_VIZUALIZATION    "color: rgb(0, 0, 255);"

class GraphNode: public BaseUI {
    Q_OBJECT

public:
    GraphNode(QWidget*);
    ~GraphNode();

    bool setup();

    void setName(QString name);
    void setHasInput(bool);
    void setHasOutput(bool);
    void setType(QString type);
    void setMeasIndex(unsigned short);
    unsigned short getMeasIndex();

    void setBaseLink(core::WeakMOPtr ptr);
    core::WeakMOPtr getBaseLink();

    QPoint *getTempPos();
    int getTempX();
    int getTempY();
    void setTempPos(int x, int y);

    bool isTempSet;

private:
    QPoint tempPos;
    unsigned short measIndex;
    core::WeakMOPtr baseLink;

private slots:
    void onInput();
    void onOutput();
};

}

#endif // GRAPHNODE_H
